﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Model;
using Controller;

namespace Facade
{
    public class LocationFacade
    {
        public string Save(Location Locations)
        {
            LocationController cont = new LocationController();
            return cont.Save(Locations);
        }

        public string Delete(Location Locations)
        {
            LocationController cont = new LocationController();
            return cont.Delete(Locations);
        }

        public string BeforeDelete(Location Locations)
        {
            LocationController cont = new LocationController();
            return cont.BeforeDelete(Locations);
        }

        public IList<Location> GetAll(string sSearch, int PageNumber, int DataLength, string SortCol, string SortDirection, out int TotalData, int BusinessGroupID)
        {
            IList<Location> Locations = new List<Location>();
            LocationController cont = new LocationController();
            Locations = cont.GetAll(sSearch, PageNumber, DataLength, SortCol, SortDirection, out TotalData, BusinessGroupID);
            return Locations;
        }

        public IList<Location> GetAllLocationsByRGMID(string sSearch, int RGMID, int PageNumber, int DataLength, string SortCol, string SortDirection, out int TotalData)
        {
            IList<Location> Locations = new List<Location>();
            LocationController cont = new LocationController();
            Locations = cont.GetAllLocationsByRGMID(sSearch, RGMID, PageNumber, DataLength, SortCol, SortDirection, out TotalData);
            return Locations;
        }

        public Location GetLocationByID(int ID)
        {
            Location Locations = new Location();
            LocationController cont = new LocationController();
            Locations = cont.GetLocationByID(ID);
            return Locations;
        }

        public Location GetLocationByDescription(string LocationDescription)
        {
            Location Locations = new Location();
            LocationController cont = new LocationController();
            Locations = cont.GetLocationByDescription(LocationDescription);
            return Locations;
        }
    }
}